<table width=100%><tr><td>
<h2>ADOdb Frequently Asked Questions</h2>
</td><td align=right><img src=adodb.gif></a></td></tr></table>
<p>
<a href=index.html><b>Home</b></a> &nbsp; <a href=index.html#download><b>Download</b></a>
<p>
<b>GENERAL</b>
<ol>
<li><b>What is ADOdb?</b><br>
An object oriented library written in PHP that abstracts database operations for portability. It is modelled on Microsoft's ADO, but has many improvements that make it unique (eg. pivot tables, Active Record support, generating HTML for paging recordsets with next and previous links, cached recordsets, HTML menu generation, etc).
  <p>
<li><b>Can I use ADOdb for commercial applications for free? </b><br>
Yes; ADOdb uses a BSD-style license so you can freely use the source code in any application, so long as you comply to the terms of license.txt.
<p>
<li><b>How can I learn ADOdb?</b><br>
See the <a href=/index.html#docs>docs</a>. There is an extensive list of tutorials listed. 
<p>
<li><b>How can I contribute to ADOdb?</b><br>
- You can translate documentation to another language.<br>
- Link to this web-site. <br>
- Port ADOdb to new databases. <br>
- Make me very happy by buying a copy of <a href=http://phplens.com/>phpLens</a>.<br>
<br>
Code contributions are also welcome provided they enhance functionality, preferably work on multiple databases, and are backward compatible.
<p>
<li><b>Who is using ADOdb?</b><br>
Many PHP applications and web-sites. There is partial list here: <a href="http://php.weblogs.com/adodb-cool-applications">http://php.weblogs.com/adodb-cool-applications</a>
<p>
<li><b>Is there a mailing list or forum to discuss ADOdb?</b><br>
There is a forum at <a href="http://phplens.com/lens/lensforum/topics.php?id=4">http://phplens.com/lens/lensforum/topics.php?id=4</a>. There is no longer any mailing list due to spammers. 
</ol>
<p>
<b>TECHNICAL</b>
<ol>

  <li><a name=t1 href=#t1>#</a> <b>Why do I get a ociplogon/ocilogon undefined error message?<br>
Why do I get a mysql_pconnect/mysql_connect undefined error message?<br>
Why do I get a ibase_timefmt undefined error message?<br>
Why do I get a *_connect/*_pconnect undefined error message?</b><br>
You do not have this extension compiled or included with PHP. On Windows, you can include it by modifying your php.ini (extension=<i>extension_name.dll</i>). On Unix, you will need to compile the extension - for help try <a href=http://www.faqts.com/knowledge_base/index.phtml/fid/51/>this knowledgebase</a>. Or perhaps you do not have the database client installed.
    <p>
<a name=t2></a>
  <li><a name=2connection href=#2connection>#</a>
<b>I am trying to create two connections to the same database, but the 2nd connection doesn't work, but reuses the first connection.</b><br>
    <p>
This is a "feature" of PHP. When you make a 2nd connection that only differs by the database name, you get back the first connection. This is normally the reason for the problem described.
    <p>

From <a href="http://php.net/manual/en/function.mysql-connect.php">http://php.net/manual/en/function.mysql-connect.php</a>
(this applies to other db's too):
    <p>

<i>If a second call is made to mysql_connect() with the same arguments, no new link will be established, but instead, the link identifier of the already opened link will be returned.</i>
    <p>

Possible solutions include: 
    <ul>
      <li> Use different userid and password for each connection. 
      <li> Use different IP or  host-address for each connection, even when connecting to same server! Eg. use 'localhost' and '127.0.0.l'.
      <li> Use NConnect( ), which always forces a new connection, if the database driver supports it (Oci8, MySQL,MSSQL and PostgreSQL).
    
      <li>Use SelectDB( ), which switches databases, if the database driver supports it (MySQL, MSSQL, Sybase).
    </ul>
    <p>


  <li> 
<b>Can you tell me what is wrong with this code snipplet? - it does not do anything...[code deleted]...</b><br>
Try turning on debugging. Eg.
    <pre>
  $DB = ADONewConnection($driver);
  $DB->debug = 1;</pre>
   This will show all error messages and generated SQL.
    <p>
  <li><b>SelectLimit with Oracle oci8 is not working.<br>
    The adodb_pager class is not working with oci8.</b><br>
You are probably using a version of Oracle earlier than 8.1.7, or have compatibility set to an earlier version in init.ora. You can try using the <i>oci805 </i>driver instead.
    <p>
  <li><b>Why does mssql only retrieve the first 255 or 4096 bytes of my data?</b><br>
See <a href="http://phplens.com/lens/lensforum/msgs.php?id=3564">http://phplens.com/lens/lensforum/msgs.php?id=3564</a>
    <p>
  <li><a href=#access>#</a><a name=access></a> <b>I tried in Microsoft Access to insert a record but i cannot see it, or it is inserted twice. Why?</b> <br>
The <a href=http://support.microsoft.com/default.aspx?scid=kb;en-us;299973>Access ODBC driver is not thread-safe</a>.
<p>
When you run Microsoft Jet in an IIS environment, it is recommended that you use the native Jet OLE DB Provider in place of the Microsoft Access ODBC driver. The Microsoft Access ODBC driver (Jet ODBC driver) can have stability issues due to the version of Visual Basic for Applications that is invoked because the version is not thread safe. 
<p>
An example of using the thread-safe OLE DB provider:
<pre>
$dsn = 'Provider=Microsoft.Jet.OLEDB.4.0;'.
             'Data Source=C:\path\to\MyDatabase.mdb;';
$db = NewADOConnection('ado_access');
$db->PConnect($dsn);
</pre>
<p>
There have been reports that using PConnect() is more reliable than Connect() with Access. 
I have also heard of good experiences using <a href=http://odbtp.sourceforge.net/>ODBTP</a>; you can
call it directly, or through the ADOdb odbtp driver.
<p>
  <li> <a name=perms href=#perms>#</a> <b>I cannot connect to Access/VFP/SQL Server from IIS. However I can connect from the desktop.</b><br>
This is probably a Windows 2000 file permissions problem. IIS assumes a specific userid when serving web pages, and it is likely that userid does not have permission to access the  database. You need to change the IIS user to someone who has permission the database.
<p>
          
  <li><b>Oracle problem with ADOdb?</b>
    <p>
If it is a very technical question, you can try this forum <a href="http://forums.oracle.com/forums/forum.jsp?forum=178">http://forums.oracle.com/forums/forum.jsp?forum=178</a>
</ol>
<hr>
(c) 2000-2004 John Lim. All rights reserved.
